<!--
 * @Author: Leo.wang wanglizhigs@163.com
 * @Date: 2024-10-13 17:44:01
 * @LastEditors: Leo.wang wanglizhigs@163.com
 * @LastEditTime: 2024-10-13 17:46:00
 * @FilePath: /aibox/src/modules/center/src/collect.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
   <scroll-view
      class="scroll"
      scroll-y="true"
      @refresherrefresh="refreshAction"
      @scrolltolower="toLowerAction"
      refresher-enabled="true"
    >
  <div class="page">
    <div class="grid column_2 p_xs">
      <div class="grid-item p_xs" v-for="item in dataList" :key="item.id">
        <Good @click="navigate(`/modules/good/src/detail?id=${item.id}`)" v-bind="item"></Good>
      </div>
    </div>
  </div>
  </scroll-view>
</template>

<script lang="ts">
import { defineComponent} from 'vue'
import { Good } from '@/components';
import { navigate } from "@/service/navigate";
import { getCollectGoodList } from '@/api/good.service';
import { usePageList } from '@/hooks/index';
export default defineComponent({
  name:'collect',
  components: {
    Good,
  },
  setup() {
    const { dataList, toLowerAction, refreshAction } = usePageList(getCollectGoodList)
    return {  navigate,  dataList, toLowerAction, refreshAction };
  }
})
</script>

<style lang="scss" scoped>

</style>

